-- GENERATED SPELL FOR [Apexis Flayer] --


function spell0_22175(pUnit, Event) --@Rend,n/a--
pUnit:FullCastSpellOnTarget(13443,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22175', 15000, 1)
end

function spell1_22175(pUnit, Event) --@Shred Armor,n/a--
pUnit:FullCastSpellOnTarget(40770,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22175', 8298, 1)
end

function Sorts_22175(pUnit, Event)
local choix_sorts_22175 = math.random(0, 1)
if choix_sorts_22175 == 0 then
pUnit:RegisterEvent('spell0_22175', 1, 1)
end
if choix_sorts_22175 == 1 then
pUnit:RegisterEvent('spell1_22175', 1, 1)
end
end

function mob22175_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22175', math.random(1500, 3000), 1)
end

function mob22175_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22175_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22175_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22175, 1, 'mob22175_Action')
RegisterUnitEvent(22175, 2, 'mob22175_Leave')
RegisterUnitEvent(22175, 3, 'mob22175_Kill')
RegisterUnitEvent(22175, 4, 'mob22175_Die')
